﻿using System;
using System.Collections.Generic;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using ConfigFile;

namespace Test
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            GenericFile cfg = new GenericFile("Config.conf");
            if (cfg == null)
                return;
            listView1.Columns[0].Text = cfg.GetKeys()[0];
            foreach (string key in cfg.GetKeys())
            {
                foreach (KeyValuePair<string, string> i in cfg.GetValue(key))
                {
                    ListViewItem p = new ListViewItem(i.Key);
                    p.SubItems.Add(i.Value);
                    listView1.Items.Add(p);
                }
            }
        }
    }
}
